<?php if(!defined('PHPOK_SET')){die('<h3>Error...</h3>');}?><!-- 产品内容页默认模板 -->
<?php QG_C_TEMPLATE::p("inc.head","","0");?>

<div id="bd">

    <div id="md_catenav">
        <a href="#" class="mleft">left</a>
        <?php
        $cates =  QGMOD_SONCATE(36,false);
        $cate_id = isset($pid)?$pid:$rs['cateid'];
        $n = 0;
        foreach($cates as $key=>$value){
            if($value['id']==$cate_id){
                $n = $key;
                break;
            }
        }
        ?>
        <input type="hidden" value="<?php echo $n; ?>" id="defSet" />
        <div class="nav"><ul class="clearfix" style="left:-<?php echo ($n-2)*300; ?>px">
            <?php 
            foreach($cates as $key=>$value){?>
            <li <?php if($value['id']==$cate_id){echo 'class="on"';}?> ><a href="<?php echo $f;?>.php?id=<?php echo $value[id];?>" ><img src="<?php echo $value[pic];?>"/></a></li>
            <?php }?>
        </ul></div>
        <a href="#" class="mright">right</a>
    </div>
    
    <div id="toolbar" class="clearfix">
    	<div id="md_sitemap">
    	    <a href="home.php">首頁</a>>
    	    <?php $_i=0;$lead_menu=(is_array($lead_menu))?$lead_menu:array();foreach($lead_menu AS  $key=>$value){$_i++; ?>
    	    <a href="<?php echo $value[url];?>"><?php echo $value[name];?></a>>
    	    <?php } ?>
            <a><?php echo $rs[subject];?></a>
    	</div>
    	<?php QG_C_TEMPLATE::p("inc.search","","0");?>
    </div>
    
    <div id="pdinfo" class="yui-g">
        <div class="yui-u first">
            <div id="md_pdimgs" class="clearfix">
                <div class="img">
                    <a href="#">
                        <?php if(isset($rsImg[0]['filename'])){ ?>
                        <img src="<?php echo $rsImg[0]['folder'].$rsImg[0]['filename'];?>" />
                        <?php }else{ ?>
                        <img src="templates/zh_hk/default/images/nopicture_400_300.gif" />
                        <?php } ?>
                    </a>
                </div>
                <div class="timgs">
                    <a href="#" class="up">up</a>
                    <div class="imgct"><div class="imgctin">
                        <?php foreach($rsImg as $key=>$value){?>
                        <a href="#" <?php if($key==0){echo 'class="on"';}?> ><img src="<?php echo $value[folder];?><?php echo $value[thumbfile];?>" bimg="<?php echo $value[folder];?><?php echo $value[filename];?>" /></a>
                        <?php } for($i=count($rsImg);$i<5;$i++){?>
                        <a href="#"><em>NO Picture</em></a>
                        <?php }?>
                    </div></div>
                    <a href="#" class="down">down</a>
                </div>
            </div>
        </div>
        <div class="yui-u second">
            <div id="md_pdtitle"><?php echo $rs[subject];?></div>
            <div id="md_pdinfo">
                <div class="hd"></div>
                <div class="bd">
                    <ul class="att">
                        <li><em>編號：</em><?php echo $rs[ext_number];?></li>
                        <li><em>名稱：</em><?php echo $rs[subject];?></li>
                        <li><em>上市：</em><?php echo date('Y年m月',strtotime($rs[onsaledate]));?></li>
                        <li><em>版本：</em><?php echo $rs[ext_1];?></li>
                        <li><em>產品狀態：</em><?php echo $rs[ext_6];?></li>
                        <?php if($rs[ext_3]!=''){ ?><li><em>車身顏色：</em><?php echo $rs[ext_3];?></li><? } php?>
                        <?php if($rs[ext_4]!=''){ ?><li><em>內座顏色：</em><?php echo $rs[ext_4];?></li><? } php?>
                        <?php if($rs[ext_5]!=''){ ?><li><em>剎車器：</em><?php echo $rs[ext_5];?></li><? } php?>
                        <li><em>建議零售價：</em>$<?php echo $rs[ext_marketprice];?> HKD</li>
                    </ul>
                    <div class="content"><?php echo $content;?></div>
                    <?php if($rs[isShop]=='1'){ ?>
                    <div class="buy clearfix">
                        <a class="btn" href="#">購 買</a>
                        <div class="form">
                            <?php echo $buylink; ?>
                        </div>
                    </div>
                    <? } ?>
                </div>
                <div class="ft"></div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<?php QG_C_TEMPLATE::p("inc.foot","","0");?>